package cn.itsource.order.domain;
import lombok.Data;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;

@Data
public class TOrderProduct {
  public static final Integer STATE_DAIZHIFU = 0;
  public static final Integer STATE_DAIXIAOFEI = 1;
  public static final Integer STATE_DAIQUEREN = 2;
  public static final Integer STATE_WANCHENG = 3;
  public static final Integer STATE_QUXIAO = -1;


  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;
  private String digest;
  private Integer state;
  //测试： double 类型来计算2个带小数的加减乘除----结果：精度会丢失（带界面的测试）
  private BigDecimal price;//BigDecimal 高精度类型。主要应用于金融行业，小数位保存位数较多的场景。
  private String orderSn;
  private String paySn;
  private java.util.Date lastPayTime;
  private java.util.Date lastConfirmTime;
  private Long productId;
  private Long userId;
  private Long shopId;

}
